package pa.iscde.core.editor.internal;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;

import pa.iscde.core.editor.OpenEditorListener;
import pt.iscte.pidesco.filebrowser.service.SourceTreeListener;
import pt.iscte.pidesco.filebrowser.service.SourceTreeUI;

public class Activator extends AbstractUIPlugin {

	public static final String ID;
	static {
		ID = FrameworkUtil.getBundle(Activator.class).getSymbolicName();
	}
	
	private SourceTreeListener listener = new OpenEditorListener();

	@Override
	public void start(BundleContext context) throws Exception {
		super.start(context);
		SourceTreeUI.addListener(listener);
	}
	
	@Override
	public void stop(BundleContext context) throws Exception {
		super.stop(context);
		SourceTreeUI.removeListener(listener);
	}
}
